ThinkPHP5


think\Log
library\think\Log.php at line 27

Class Log

Log

public class Log

Class Log

Method:
void log($msg) static
void error($msg) static
void info($msg) static
void sql($msg) static
void notice($msg) static
void alert($msg) static

Constant Summary
final static str

ALERT

final static str

ERROR

final static str

INFO

final static str

LOG

final static str

NOTICE

final static str

SQL

Method Summary
static void

init(array config)

日志初始化

static array

getLog(string type)

获取日志信息

static void

record(mixed msg, string type)

记录调试信息

static void

clear()

清空日志信息

static void

key(string key)

当前日志记录的授权key

static bool

check(array config)

检查日志写入权限

static bool

save()

保存调试信息

static bool

write(mixed msg, string type, bool force)

实时写入日志信息 并支持行为

Constant Detail

library\think\Log.php at line 34

ALERT

public final static str ALERT = 'alert'

library\think\Log.php at line 30

ERROR

public final static str ERROR = 'error'

library\think\Log.php at line 31

INFO

public final static str INFO = 'info'

library\think\Log.php at line 29

LOG

public final static str LOG = 'log'

library\think\Log.php at line 33

NOTICE

public final static str NOTICE = 'notice'

library\think\Log.php at line 32

SQL

public final static str SQL = 'sql'

Method Detail

library\think\Log.php at line 52

init

public static void init(array config)

日志初始化


library\think\Log.php at line 72

getLog

public static array getLog(string type)

获取日志信息

Parameters:
type - 信息类型

library\think\Log.php at line 83

record

public static void record(mixed msg, string type)

记录调试信息

Parameters:
msg - 调试信息
type - 信息类型

library\think\Log.php at line 92

clear

public static void clear()

清空日志信息


library\think\Log.php at line 102

key

public static void key(string key)

当前日志记录的授权key

Parameters:
key - 授权key

library\think\Log.php at line 112

check

public static bool check(array config)

检查日志写入权限

Parameters:
config - 当前日志配置参数

library\think\Log.php at line 124

save

public static bool save()

保存调试信息


library\think\Log.php at line 166

write

public static bool write(mixed msg, string type, bool force)

实时写入日志信息 并支持行为

Parameters:
msg - 调试信息
type - 信息类型
force - 是否强制写入

ThinkPHP5